body {
    width: 400px;
    min-height: 500px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

h2 {
    color: #555;
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.settings-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-section p {
    color: #666;
    margin-bottom: 10px;
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    background-color: #004085;
}

#backToPopup {
    background-color: #6c757d;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
}

#backToPopup:hover {
    background-color: #545b62;
}

#displaySensitiveData {
    font-family: monospace;
    font-size: 12px;
    color: #333;
    word-break: break-all;
}

/* Smart Categorization Styles */
.smart-categorization-section {
    margin-bottom: 20px;
}

.smart-categorization-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.categorization-toggle {
    margin-bottom: 15px;
}

.categorization-toggle label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.categorization-toggle input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.categorization-settings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.file-type-rules, .custom-tags {
    margin-bottom: 20px;
}

.file-type-rules h4, .custom-tags h4 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.rule-item, .tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.rule-item span, .tag-item span {
    flex: 1;
    font-size: 13px;
}

.rule-item button, .tag-item button {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rule-item button:hover, .tag-item button:hover {
    background: #c82333;
}

.add-rule-form, .add-tag-form {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.add-rule-form input, .add-tag-form input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.add-rule-form select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.add-rule-form button, .add-tag-form button {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-rule-form button:hover, .add-tag-form button:hover {
    background: #218838;
}

.categorization-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.categorization-actions button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-categorization {
    background: #007bff;
    color: white;
}

.save-categorization:hover {
    background: #0056b3;
}

.reset-categorization {
    background: #6c757d;
    color: white;
}

.reset-categorization:hover {
    background: #545b62;
}

.file-type-rule {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.file-type-rule input[type="text"] {
    margin-right: 8px;
    flex: 1;
}

.file-type-rule select {
    margin-right: 8px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.file-type-rule button {
    background-color: #dc3545;
    padding: 4px 8px;
    font-size: 12px;
}

.file-type-rule button:hover {
    background-color: #c82333;
}

.custom-tag {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 12px;
}

.custom-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.custom-tag .remove-tag:hover {
    color: #ffcccc;
}

/* File Verification Styles */
.file-verification-section {
    margin-bottom: 20px;
}

.file-verification-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.verification-toggle {
    margin-bottom: 15px;
}

.verification-toggle label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.verification-toggle input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.verification-settings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.verification-types, .failure-actions, .advanced-settings {
    margin-bottom: 20px;
}

.verification-types h4, .failure-actions h4, .advanced-settings h4 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.verification-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.verification-checkboxes label {
    display: flex;
    align-items: center;
    font-size: 13px;
    cursor: pointer;
}

.verification-checkboxes input[type="checkbox"] {
    margin-right: 6px;
}

.failure-actions-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.failure-actions-group label {
    display: flex;
    align-items: center;
    font-size: 13px;
    cursor: pointer;
}

.failure-actions-group input[type="radio"] {
    margin-right: 6px;
}

.advanced-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.advanced-setting label {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.advanced-setting input[type="number"] {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.advanced-setting input[type="checkbox"] {
    margin-left: 10px;
}

.verification-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.verification-actions button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-verification {
    background: #007bff;
    color: white;
}

.save-verification:hover {
    background: #0056b3;
}

.reset-verification {
    background: #6c757d;
    color: white;
}

.reset-verification:hover {
    background: #545b62;
}

/* Custom Request Headers Styles */
.custom-headers-section {
    margin-bottom: 20px;
}

.custom-headers-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.headers-toggle {
    margin-bottom: 15px;
}

.headers-toggle label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.headers-toggle input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.headers-settings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.header-item, .domain-header-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.header-info, .domain-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-name {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.header-value {
    color: #6c757d;
    font-size: 12px;
    font-family: monospace;
    word-break: break-all;
}

.domain-pattern {
    font-weight: 600;
    color: #007bff;
    font-size: 12px;
    margin-bottom: 2px;
}

.header-toggle {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

.header-toggle input[type="checkbox"] {
    margin-right: 4px;
    transform: scale(0.9);
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}

.remove-btn:hover {
    background: #c82333;
}

.add-header-form {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.add-header-form input {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.add-header-form input:first-child {
    flex: 1;
    min-width: 120px;
}

.add-header-form input:nth-child(2) {
    flex: 2;
    min-width: 150px;
}

.add-header-form input:nth-child(3) {
    flex: 1;
    min-width: 100px;
}

.add-header-form button {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.add-header-form button:hover {
    background: #218838;
}

.template-section {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.template-section select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.template-section button {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.template-section button:hover {
    background: #138496;
}

.import-export-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.import-export-section button {
    background: #6f42c1;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.import-export-section button:hover {
    background: #5a32a3;
}

.headers-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.headers-actions button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-headers {
    background: #007bff;
    color: white;
}

.save-headers:hover {
    background: #0056b3;
}

.reset-headers {
    background: #6c757d;
    color: white;
}

.reset-headers:hover {
    background: #545b62;
}

label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

input[type="checkbox"] {
    cursor: pointer;
}